﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WowGuildSite.Armory
{
    public class ArmoryDefenseStats
    {
        private ArmoryCharacter character;

        public int      ArmorBase
        {
            get
            {
                return character.SheetDocument.GetAttributeInt("page/characterInfo/characterTab/defenses/armor/@base");
            }
        }

        public int      ArmorEffective
        {
            get
            {
                return character.SheetDocument.GetAttributeInt("page/characterInfo/characterTab/defenses/armor/@effective");
            }
        }

        public decimal  ArmorAbsorption
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/armor/@percent");
            }
        }

        public decimal  Defense
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/defense/@value");
            }
        }

        public decimal  Dodge
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/dodge/@percent");
            }
        }

        public decimal  Parry
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/parry/@percent");
            }
        }

        public decimal  Block
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/block/@percent");
            }
        }

        public decimal  ResilienceDamage
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/resilience/@damagePercent");
            }
        }

        public decimal   ResilienceHit
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/resilience/@hitPercent");
            }
        }

        public decimal   Resilience
        {
            get
            {
                return character.SheetDocument.GetAttributeDecimal("page/characterInfo/characterTab/defenses/resilience/@value");
            }
        }


        internal ArmoryDefenseStats( ArmoryCharacter character )
        {
            if (character == null)
            {
                throw new ArgumentNullException("character");
            }

            this.character = character;
        }
    }
}
